package bairui.international.common.config;

import java.io.File;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import com.lianjing.sh.project.config.web.properties.Project_Properties_Web_File;

import lombok.Getter;

@Import({
	Project_Properties_Web_File.class,
})
@Configuration
public class Config_Path {
	
//	@Value("${service.img.port}") 
//	@Getter private int service_img_port;
	
	@Autowired private Project_Properties_Web_File config;
	
	private @Getter String RootPosition;
	private @Getter String RootImage;
	private @Getter String RootFile;
	
	// 图片
	private @Getter String position_Image_Product;
	private @Getter String position_Image_ProductOrderItem;
	private @Getter String position_Image_AboutImage;
	private @Getter String position_Image_ProductRollImage;
	private @Getter String position_Image_Order_RemitImg;
	private @Getter String position_Image_UserRechargeOrder_RemitImg;
	private @Getter String position_Image_BranchCompanyWithdrawOrder_RemitImg;
	private @Getter String position_Image_IndexRoll;
	private @Getter String position_Image_IndexModuleImg;
	private @Getter String position_Image_CollegeCategory_RollManage;
	private @Getter String position_Image_CollegeImage;
	private @Getter String position_Image_SpreadImage;
	//
	private @Getter String position_Image_QR_User;
	private @Getter String position_Image_QR_Ticket;
	//
	private @Getter String position_Image_QR_CompanyStaff;
	//
	private @Getter String position_Image_PrizeBackground;
	private @Getter String position_Image_PrizeItem;
	private @Getter String position_Image_WinPrize;
	
	// 文档位置
//	private @Getter String position_Document_SaleContractDocument;
//	private @Getter String position_Document_ProductionInstructDocument;
//	private @Getter String position_Document_PurchaseMaterialCheckItemDocument;
	
	@PostConstruct
	void postConstruct() throws Exception{
		RootPosition = config.getFile_basePosition()
				.replace("\\", File.separator)
				.replace("/", File.separator);
		//
		RootImage = RootPosition +"image"+File.separator;
		RootFile = RootPosition +"file"+File.separator;
		// sale
//		position_Document_SaleContractDocument	= RootFile + "saleContractDocument" + File.separator;
//		position_Document_ProductionInstructDocument = RootFile + "productionInstructDocument" + File.separator;
//		position_Document_PurchaseMaterialCheckItemDocument = RootFile + "purchaseMaterialCheckItemDocument" + File.separator;
		//
		position_Image_Product = RootImage + "product" + File.separator;
//		position_Image_ProductOrder = RootImage + "productOrder" + File.separator;
		position_Image_ProductOrderItem = RootImage + "productOrderItem" + File.separator;
		position_Image_AboutImage = RootImage + "aboutImage" + File.separator;
		position_Image_ProductRollImage = RootImage + "productRollImage" + File.separator;
		position_Image_CollegeCategory_RollManage = RootImage + "collegeCategoryRollManage" + File.separator;
		position_Image_CollegeImage = RootImage + "collegeImage" + File.separator;
		position_Image_Order_RemitImg = RootImage + "OrderRemitImg" + File.separator;
		position_Image_UserRechargeOrder_RemitImg = RootImage + "UserRechargeOrderRemitImg" + File.separator;
		position_Image_BranchCompanyWithdrawOrder_RemitImg = RootImage + "UserWithdrawOrderRemitImg" + File.separator;
		position_Image_IndexRoll = RootImage + "IndexRoll" + File.separator;
		position_Image_IndexModuleImg = RootImage + "IndexModuleImg" + File.separator;
		position_Image_SpreadImage = RootImage + "SpreadImage" + File.separator;
//		position_Image_QR_User = RootImage + "qr" + File.separator + "user" + File.separator;
		position_Image_QR_CompanyStaff = RootImage + "qr" + File.separator + "companyStaff" + File.separator;
		position_Image_QR_Ticket = RootImage + "qr" + File.separator + "ticket" + File.separator;
		position_Image_PrizeBackground = RootImage + "PrizeBackground" + File.separator;
		position_Image_PrizeItem = RootImage + "PrizeItem" + File.separator;
		position_Image_WinPrize = RootImage + "WinPrize" + File.separator;
	}

}
